package com.jeesite.modules.exam.score.dao;

import com.jeesite.common.dao.CrudDao;
import com.jeesite.common.mybatis.annotation.MyBatisDao;
import com.jeesite.modules.exam.assessment.entity.DcSupExamInfo;
import com.jeesite.modules.exam.notice.entity.DcSupExamNotice;
import com.jeesite.modules.exam.quota.entity.DcSupExamQuotaAdd;
import com.jeesite.modules.exam.quota.entity.DcSupExamSumQuotaInfo;
import com.jeesite.modules.exam.score.entity.DcSUpExamDxExport;
import com.jeesite.modules.exam.score.vo.DcSupExamQuotaOrgVo;
import com.jeesite.modules.exam.score.entity.DcSupExamScore;
import com.jeesite.modules.exam.score.entity.DcSupExamScoreInfo;
import com.jeesite.modules.exam.score.entity.DcSupExamSumScore;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 考核任务指标评分表DAO接口
 *
 * @author xhc
 * @version 2022-06-01
 */
@MyBatisDao
public interface DcSupExamScoreDao extends CrudDao<DcSupExamScoreInfo> {

    List<DcSupExamSumQuotaInfo> findZpListData(@Param("dcSupExamNotice") DcSupExamNotice dcSupExamNotice, @Param("exameOrg") String exameOrg);

    DcSupExamScore findDcSupExamScore(DcSupExamScore dcSupExamScore);

    void insertDcSupExamScore(DcSupExamScore dcSupExamScore);

    void insertDcSupExamListScore(List<DcSupExamScoreInfo> scoreInfoList);

    void insertDcSupExamListSumScore(List<DcSupExamSumScore> sumScoreList);

    List<DcSupExamQuotaOrgVo> findAssessmentUnit(String examId, String quotaGroup);

    List<DcSupExamSumQuotaInfo> finGjpListData(@Param("examId") String examId, @Param("exameOrg") String exameOrg);

    List<DcSupExamSumQuotaInfo> findDXListData(DcSupExamSumQuotaInfo dcSupExamSumQuotaInfo);

    void insertDcSupExamQuotaList(List<DcSupExamQuotaAdd> dcSupExamQuotaAddList);

    List<DcSupExamQuotaAdd> findDxQuotaAddList(@Param("dcSupExamNotice") DcSupExamNotice dcSupExamNotice,@Param("exameOrg") String exameOrg);

    List<DcSupExamScore> findDcSupExamScoreList(DcSupExamScore dcSupExamScore);

    void updateDcSupExamScore(DcSupExamScore dcSupExamScore);

    List<DcSupExamSumQuotaInfo> findUnitScoreListData(DcSupExamSumQuotaInfo dcSupExamSumQuotaInfo);

    List<DcSupExamSumQuotaInfo> findDXListDataPage(DcSupExamSumQuotaInfo dcSupExamSumQuotaInfo);

    void updateDcSupDXExamScore(@Param("score") DcSupExamScore dcSupExamScore, @Param("quota") List<String> quotaIds);

    List<DcSUpExamDxExport> exportDxScore(DcSupExamScore dcSupExamScore);

    List<DcSupExamInfo> gjIndexListData(DcSupExamInfo dcSupExamInfo);

    List<DcSupExamScore> findDxExamScoreList(DcSupExamScore dcSupExamScore);

    DcSupExamScore findDcSupExamScoreWithGradeOrg(DcSupExamScore dcSupExamScore);

    List<Map<String, String>> getNoScoreGradeOrg(@Param("examId") String examId, @Param("examOrg") String examOrg);

    List<DcSupExamQuotaOrgVo> findScoreOrgByexamId(@Param("examId")String examId, @Param("groupId") String groupId);

    List<DcSupExamScore> findDxaffirmList(DcSupExamScore dcSupExamScore);

    int dxWithdraw(DcSupExamSumQuotaInfo dcSupExamSumQuotaInfo);

    DcSupExamScoreInfo queryScoreInfoById(DcSupExamSumScore score);

    int updateScoreInfo(DcSupExamSumScore score);

    int updateSumScore(DcSupExamSumScore score, DcSupExamSumScore score_db);

    void deleteDcSupExamScoreById(DcSupExamScore dcSupExamScore);

    void deleteDcSupExamScoreInfoByScoreId(DcSupExamScore dcSupExamScore);

    void deleteDcSupExamSumScoreById(DcSupExamScore dcSupExamScore);

    int withDrawGJScore(DcSupExamScore dcSupExamScoreVo);
}